package ch.mtb.conwin;

public class TorusPopulation extends Population {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    public int boundaryGuard(int position) {

        // check if the coordinates are beyond the world boundaries and if so,
        // put position back to the opposite edge

        int max = this.getDimensions();
        return position % max;
    }
}
